<#include "header.htm"/>


<h2 class="solo">${I18n.getMessage("Search.search")}</h2>
<form accept-charset="${encoding}" action="${JForumContext.encodeURL("/jforum")}" method="get" id="formSearch" name="formSearch">
	<input type="hidden" name="module" value="${moduleName}" />
	<input type="hidden" name="action" value="search" />

<div class="panel">
	<div class="inner"><span class="corners-top"><span></span></span>
	<h3>${I18n.getMessage("Search.searchQuery")}</h3>

	<fieldset>
	<dl>
		<dt><label for="search_keywords">${I18n.getMessage("Search.typeKeywords")}</label></dt>
		<dd><input type="text" class="inputbox" name="search_keywords" id="search_keywords" size="30" title="Search for keywords" /></dd>
		<dd><label for="terms1"><input type="radio" name="all_terms" id="all_terms" value="all" checked="checked" /> ${I18n.getMessage("Search.allTerms")}</label></dd>
		<dd><label for="terms2"><input type="radio" name="match_type" id="match_type" value="any" /> ${I18n.getMessage("Search.anyTerm")}</label></dd>
	</dl>
	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</div>



<div class="panel bg2">
	<div class="inner"><span class="corners-top"><span></span></span>

	<h3>${I18n.getMessage("Search.options")}</h3>

	<fieldset>
	<dl>
		<dt><label>${I18n.getMessage("Search.forum")}:</label></dt>
		<dd>
				<select class="post" name="search_forum">
					<option value="" selected="selected">${I18n.getMessage("Search.allAvailable")}</option>
					<#list categories as c>
						<optgroup label="${c.name}">
							<#list c.getForums() as f>
								<option value="${f.id}">${f.name}</option>
							</#list>
						</optgroup>
					</#list>
				</select>
		
		
		</dd>
	</dl>
	<dl>
	    <dt><label for="search_child1">${I18n.getMessage("Search.orderBy")}:</label></dt>
		<dd>
			<select class="post" name="sort_by" onChange="enableDisableOrderBy(this.value);">
				<option value="relevance" selected="selected">${I18n.getMessage("Search.relevance")}</option>
				<option value="time">${I18n.getMessage("Search.postDate")}</option>
			</select>
		      
		</dd>
	</dl>
	
	<dl>
		<dt></dt>
		<dd>
			<input type="radio" value="ASC" name="sort_dir" id="sort_asc"/><label for="sort_asc">${I18n.getMessage("Search.ascending")}</label>
		</dd>
		<dd>
			<input type="radio" checked="checked" value="DESC" name="sort_dir" id="sort_desc"/><label for="sort_desc">${I18n.getMessage("Search.descending")}</label>
		</dd>
	</dl>

	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</div>

<div class="panel bg3">
	<div class="inner"><span class="corners-top"><span></span></span>

	<fieldset class="submit-buttons">
		<input type="submit" name="submit" value="${I18n.getMessage("Search.search")}" class="button1" />
	</fieldset>

	<span class="corners-bottom"><span></span></span></div>
</div>

</form>












<script type="text/javascript">
<!--
document.formSearch.search_keywords.focus();

function enableDisableOrderBy(type)
{
	var isDisabled = type == "relevance";
	document.formSearch.sort_dir[0].disabled = isDisabled;
	document.formSearch.sort_dir[1].disabled = isDisabled;
	
	if (isDisabled) {
		document.formSearch.sort_dir[1].checked = true;
	}
}

enableDisableOrderBy("relevance");
-->
</script>
<#include "bottom.htm"/>